
<html>

<head>
    <include file="public@head" title="短信设置"/>
</head>

<body class="layui-layout-admin">
<include file="public@header"/>
<include file="public@side"/>

<div class="layui-body">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a href="{:url('tdadmin/index/index')}">主页</a>
        <a>系统设置</a>
        <a href="{:url('tdadmin/sms/index')}"><cite>短信设置</cite></a>
    </div>
    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li class="layui-this"><a href="{:url('tdadmin/sms/index')}">短信设置</a></li>
            <li><a href="{:url('tdadmin/sms/template')}">短信模板</a></li>
        </ul>
    </div>
    <div class="layui-fluid">
        <div class="layui-row">
            <div class="layui-card">
                <div class="layui-card-header">
                    短信设置
                </div>
                <div class="layui-card-body layui-row">
                    <form method="post" class="layui-form layui-col-md6" action="{:url('tdadmin/sms/index')}">
                        <div class="layui-form-item">
                            <label class="layui-form-label"><span class="form-required">*</span>accessKeyId</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input" lay-verify="required|text" name="accessKeyId"
                                       value="{$accessKeyId|default=''}">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><span class="form-required">*</span>accessSecret</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input" lay-verify="required" name="accessSecret"
                                       value="{$accessSecret|default=''}">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label"><span class="form-required">*</span>signName</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input" lay-verify="required" name="signName"
                                       value="{$signName|default=''}">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="save">
                                    保存修改
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<include file="public@scripts"/>
<script>
    form.on('submit(save)', function (data) {
        $.post(data.action, data.field, function (res) {
            layer.msg(res.msg, {}, function () {
                if (res.url) { //如果返回值有需要跳转的url则跳转，否则重载当前页面
                    window.location.href = res.url;
                }
                else {
                    window.location.reload();
                }
            });
        });
        return false;
    });
</script>
</body>

</html>
